package com.bw.mvvm_common.utils;

import android.content.SharedPreferences;

import com.bw.mvvm_common.BaseApplication;

/**
 * 本地临时存储工具类
 * */
public class SPUtils {

    private static String name = "catch";

    public static void writeToken(String value){
        SharedPreferences sp = BaseApplication.getApplication().getSharedPreferences(name,0);
        sp.edit().putString("token",value).commit();
    }

    public static String readToken(){
        SharedPreferences sp = BaseApplication.getApplication().getSharedPreferences(name,0);
        return sp.getString("token","");
    }

}
